#!/usr/local/bin/python3
__author__ = '曹植'

import os
import json
import random


def user_agents_manager():
    path = os.path.split(os.path.abspath(__file__))[0][:-16]
    with open(path + '/static/user_agents.json', 'r', encoding='utf-8') as f:
        agents = json.load(f)
    return random.choice(agents['Computer'])
